package com.hzdesk.media.koreabatchmatvector.logic.model;

import android.content.Context;

import com.hzdesk.media.koreabatchmatvector.bean.VideoFile;
import com.hzdesk.media.koreabatchmatvector.dao.VideoFileDaoUtils;
import com.hzdesk.media.koreabatchmatvector.logic.contract.VideoListContract;

import java.util.List;

/**
 * Created by Administrator on 2018/7/31.
 */

public class VideoListModle implements VideoListContract.IVideoListModle{
    @Override
    public boolean update(VideoFile videoFile, Context context) {
        VideoFileDaoUtils videoFileDaoUtils=new VideoFileDaoUtils(context);
        return  videoFileDaoUtils.updateVideoFile(videoFile);
    }

    @Override
    public void deleteVideoFiles(List<VideoFile> list, Context context) {
        VideoFileDaoUtils videoFileDaoUtils=new VideoFileDaoUtils(context);
        for(VideoFile videoFile:list){
            videoFileDaoUtils.deleteVideoFil(videoFile);
        }
    }
}
